#ifndef _CONSOLE_PARAM_H
#define _CONSOLE_PARAM_H

#ifdef __cplusplus
extern "C" {
#endif

#include "od_param.h"
#include "param_json.h"
#include "json_rpc.h"
#include "od_framework.h"
#include "param_rpc.h"

typedef struct import_params_s{
    int src_id;
    int dst_id;
    char post_name[OD_MAX_OBJ_NAME];
    char file_name[OD_MAX_OBJ_NAME];
}import_params;

typedef struct export_params_s{
    char file_name[OD_MAX_OBJ_NAME];
}export_params;

typedef struct switch_ctrl_params_s{
    int ftp_ctrl;
    int ssh_ctrl;
}switch_ctrl_params;

typedef struct sw_monitor_params_s{
    int reboot;
}sw_monitor_params;

typedef struct alarm_info_params_s{
    int alarm_info_pro_ctrl;
}alarm_info_params;

typedef struct system_info_params_s{
    char board_name[OD_MAX_OBJ_NAME];
    char hard_ver[OD_MAX_OBJ_NAME];
    char odin_ver[OD_MAX_OBJ_NAME];
    char kernel_ver[OD_MAX_OBJ_NAME];
    char dtb_ver[OD_MAX_OBJ_NAME];
    char sn[OD_MAX_OBJ_NAME];
    char mac0[OD_MAX_OBJ_NAME];
    char mac1[OD_MAX_OBJ_NAME];
    char runtime[OD_MAX_OBJ_NAME]; /*xx hours-xx mins- xx-seconds*/
    int ucmp_baud_rate_id;
    int ucmp_device_id;
}system_info_params;

typedef struct
{
    char post_name[OD_MAX_PATH_LEN];
    uint32_t dst_id;
    uint32_t notify_id;
    uint32_t notify_response_id;

} notify_params;

typedef struct param_load_and_sav_params_s{
    int load;
    int sav;
}param_load_and_sav_params;

/************************************************************************************************/
/*********************************  CONSOLE   PARAMS    *****************************************/
/************************************************************************************************/
typedef struct console_params_s{
    /*total*/
    import_params import;
    export_params export;
    param_load_and_sav_params load_and_sav;
    sw_monitor_params sw_monitor;
    alarm_info_params alarm_info;
    system_info_params sys;
    switch_ctrl_params switch_ctrl;
    char version[OD_MAX_OBJ_NAME]; /*进程版本号*/
    char date[OD_MAX_OBJ_NAME];   /*编译日期*/
    char system_version[OD_MAX_OBJ_NAME];
}console_param;

/************************************************************************************************/
/**********************************      END      ***********************************************/
/************************************************************************************************/

typedef struct json_param_console_s{
    /*参数结构体*/
    console_param  mem;

    /*json 参数接口*/
    jsparam_hdl json_hdl;
    struct json_object *json_obj;
    char console_json_filename[OD_MAX_PATH_LEN];
    char post_name[OD_MAX_PATH_LEN];
    int sw_monitor_id;
    int dst_id;
    int notify_id;
    param_rpc_handle rpc_handle;
}json_param_console;

#ifdef __cplusplus
}
#endif

#endif /* _USR_PARAM_H */
